

export class DeviceConfig {
  constructor(deviceType, basicData, deviceModel) {
    this.deviceType = deviceType;
    this.basicData = basicData;
    this.deviceModel = deviceModel;
    this.autoSubDeviceModelTopic = true;
  }
}

export const DeviceType = {
  CLIENT: 'CLIENT',
  SERVER: 'SERVER',
  PROVISION: 'PROVISION',
  PROVISION_RECEIVER: 'PROVISION_RECEIVER'
};

export class DeviceBasicData {

  username = "1559108322@qq.com";
  password = "123456";
  clientId = "user.1559108322@qq.com|timestamp=1712109418196,clientType=user,securemode=2,signmethod=hmacsha256|";

  constructor( productKey, deviceName, group) {
    this.productKey = productKey;
    this.deviceName = deviceName;
    this.group = group;
    this.desc = null;
    this.addr = null;
    this.port = 0;
  }

  getDevId() {
    return this.getProductKey() + this.getDeviceName();
  }

  getProductKey() {
    return this.productKey;
  }

  getDeviceName() {
    return this.deviceName;
  }
}


